package com.example.redisConfig;

import org.redisson.Redisson;
import org.redisson.config.Config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;


/**
 * @author: 15489  <br/>
 * Date: 2022/3/24:15:24  <br/>
 * Description:
 */
@Configuration
public class RedissonConfiguration {

    @Bean
    public Redisson redisson(){
        Config config = new Config();
        config.useSingleServer().setAddress("redis://192.168.58.128:6379").setDatabase(0);
        return (Redisson)Redisson.create(config);
    }

}
